Stepping outside Visual Studio IDE [Part 2 of 2] with Mono 2.6.4
Posted
by mbcrump
on Geeks with Blogs
See other posts from Geeks with Blogs
or by mbcrump
Published on Wed, 19 May 2010 08:24:52 GMT
Indexed on
2010/05/19
15:40 UTC
Read the original article
Hit count: 319
Continuing part 2 of my Stepping outside the Visual Studio IDE, is the open-source Mono Project.
Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell (http://www.novell.com/), Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications.
So, to clarify. You can use Mono to develop .NET applications that will run on Linux, Windows or Mac. It’s basically a IDE that has roots in Linux. Let’s first look at the compatibility:
Compatibility
If you already have an application written in .Net, you can scan your application with the Mono Migration Analyzer (MoMA) to determine if your application uses anything not supported by Mono.
The current release version of Mono is 2.6. (Released December 2009)
The easiest way to describe what Mono currently supports is:
Everything in .NET 3.5 except WPF and WF, limited WCF.
Here is a slightly more detailed view, by .NET framework version:
Implemented
- C# 3.0
- System.Core
- LINQ
- ASP.Net 3.5
- ASP.Net MVC
- C# 2.0 (generics)
- Core Libraries 2.0: mscorlib, System, System.Xml
- ASP.Net 2.0 - except WebParts
- ADO.Net 2.0
- Winforms/System.Drawing 2.0 - does not support right-to-left
- C# 1.0
- Core Libraries 1.1: mscorlib, System, System.Xml
- ASP.Net 1.1
- ADO.Net 1.1
- Winforms/System.Drawing 1.1
Partially Implemented
- LINQ to SQL - Mostly done, but a few features missing
- WCF - silverlight 2.0 subset completed
Not Implemented
- WPF - no plans to implement
- WF - Will implement WF 4 instead on future versions of Mono.
- System.Management - does not map to Linux
- System.EnterpriseServices - deprecated
Links to documentation.
Links to binaries.
Mono IDE Latest Version is 2.6.4
That's it, nothing more is required except to compile and run .net code in Linux.
Installation
After landing on the mono project home page, you can select which platform you want to download.
I typically pick the Virtual PC image since I spend all of my day using Windows 7. Go ahead and pick whatever version is best for you. The Virtual PC image comes with Suse Linux.
Once the image is launch, you will see the following:
I’m not going to go through each option but its best to start with “Start Here” icon. It will provide you with information on new projects or existing VS projects.
After you get Mono installed, it's probably a good idea to run a quick Hello World program to make sure everything is setup properly. This allows you to know that your Mono is working before you try writing or running a more complex application.
To write a "Hello World" program follow these steps:
- Start Mono Development Environment.
- Create a new Project:
- File->New->Solution
- Select "Console Project" in the category list.
- Enter a project name into the Project name field, for example, "
HW Project
". - Click "Forward"
- Click “Packaging” then OK.
- You should have a screen very simular to a VS Console App.
- Click the "Run" button in the toolbar (Ctrl-F5).
- Look in the Application Output and you should have the “Hello World!”
- Your screen should look like the screen below.
That should do it for a simple console app in mono.
To test out an ASP.NET application, simply copy your code to a new directory in /srv/www/htdocs, then visit the following URL:
http://localhost/directoryname/page.aspx
where directoryname is the directory where you deployed your application and page.aspx is the initial page for your software.
Databases
You can continue to use SQL server database or use MySQL, Postgress, Sybase, Oracle, IBM’s DB2 or SQLite db.
Conclusion
I hope this brief look at the Mono IDE helps someone get acquainted with development outside of VS. As always, I welcome any suggestions or comments.
© Geeks with Blogs or respective owner